home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Development Tools & Languages / MacApp C++ Load⁄dump / DemoTextDump 1 / MDemoText.cp < prev    next >
Encoding:
Text File  |  1992-07-15  |  1.5 KB  |  54 lines  |  [TEXT/MPS ]

  1. /*******************************************************************************
  2. *
  3. * File:   MDemoText.cp
  4. *
  5. * Description: Main Program
  6. *
  7. *
  8. * Copyright © 1985 - 1990 by Apple Computer, Inc. All rights reserved.
  9. ********************************************************************************/
  10.  
  11. #ifndef __DEMOTEXTDUMP__
  12. #include "DemoTextDump.h"
  13. #endif  __DEMOTEXTDUMP__
  14.  
  15.  
  16. //  {$MC68020-}                                                // The main program must be universal code
  17. //  {$MC68881-}
  18.  
  19.  
  20. #pragma segment Main
  21.  
  22. void main()
  23.     {
  24.     TDemoTextApplication *gDemoTextApplication;
  25.  
  26.     InitToolBox();                                             // Essential toolbox and utilities
  27.                                                             // initialization
  28.     if (ValidateConfiguration(&gConfiguration))                // Make sure we can run
  29.         {
  30.  
  31.         // Continue with remainder of initialization
  32.         InitUMacApp(8);                                     // Initialize MacApp; 8 calls to MoreMasters
  33.  
  34.         // ------------------------------------------------------
  35.         // If you are going to use streams for debugging IO then:
  36.         // #include <stdio.h>
  37.         // #include <iostream.h>
  38.         // and execute the following line since MacApp's debug output is essentialy "printf"s
  39.  
  40.         // cout.sync_with_stdio();
  41.  
  42.         InitUPrinting();                                    // Initialize the Printing unit
  43.         InitUTEView();                                        // Initialize the TEView unit
  44.         
  45.         gDemoTextApplication = new TDemoTextApplication;    // Create an application object
  46.         FailNIL(gDemoTextApplication);
  47.         gDemoTextApplication->IDemoTextApplication();        // Initialize the application
  48.         gDemoTextApplication->Run();                        // Run the application
  49.         }
  50.     else
  51.         {
  52.         StdAlert(phUnsupportedConfiguration);
  53.         }
  54.     }